<template>
    <div class="TopicBlogCom">
        <h1>
            <router-link :to="{name:'Blog'}">
                主题博客
                <i class="fa fa-chevron-right"></i>
            </router-link>
        </h1>
        <article>
            <div class="TopicBlog" v-for="{picUrl,item} in list" :key="item">
                <router-link :to="{name:'Blog'}">
                    <img :src="picUrl">
                </router-link>
            </div>
        </article>
    </div>
</template>

<script>
import {
    DJcatelist
} from '@/library/api/api'
export default {
    name:'TopicBlogCom',
    data() {
        return {
            list:{}
        }
    },
    methods:{
        TopicBlog() {
            DJcatelist({}).then(res=>{
                // console.log(res);
                this.list = res.djRadios.map(item=>{
                    return item
                })
                this.list.length = 6
            })
        }
    },
    created() {
        this.TopicBlog()
    }
}
</script>

<style lang="scss" scoped>
@import './TopicBlogCom.scss'
</style>
